From a3736b8b9fa019d96d29da5a823603c45e6ca50c Mon Sep 17 00:00:00 2001 From: Keir Fraser Date: Fri, 15 Feb 2008 09:54:28 +0000 Subject: [PATCH] vt-d: Fix dom0 boot issue with vtd=1 on Stoakley platform. Turn off excessive messages. Signed-off-by: Allen Kay --- xen/arch/x86/hvm/vmx/vtd/dmar.c | 2 +- xen/arch/x86/hvm/vmx/vtd/intel-iommu.c | 17 ++++++++++++++--- 2 files changed, 15 insertions(+), 4 deletions(-) diff --git a/xen/arch/x86/hvm/vmx/vtd/dmar.c b/xen/arch/x86/hvm/vmx/vtd/dmar.c index 1e320ad27d..4f3f71e962 100644 --- a/xen/arch/x86/hvm/vmx/vtd/dmar.c +++ b/xen/arch/x86/hvm/vmx/vtd/dmar.c @@ -102,7 +102,7 @@ struct iommu * ioapic_to_iommu(unsigned int apic_id) return drhd->iommu; } } - dprintk(XENLOG_WARNING VTDPREFIX, "returning NULL\n"); + dprintk(XENLOG_INFO VTDPREFIX, "returning NULL\n"); return NULL; } diff --git a/xen/arch/x86/hvm/vmx/vtd/intel-iommu.c b/xen/arch/x86/hvm/vmx/vtd/intel-iommu.c index c497b9c392..1121896a7e 100644 --- a/xen/arch/x86/hvm/vmx/vtd/intel-iommu.c +++ b/xen/arch/x86/hvm/vmx/vtd/intel-iommu.c @@ -1811,7 +1811,18 @@ static int init_vtd_hw(void) flush = iommu_get_flush(iommu); flush->context = flush_context_reg; flush->iotlb = flush_iotlb_reg; + } + return 0; +} + +static int init_vtd2_hw(void) +{ + struct acpi_drhd_unit *drhd; + struct iommu *iommu; + for_each_drhd_unit ( drhd ) + { + iommu = drhd->iommu; if ( qinval_setup(iommu) != 0 ) dprintk(XENLOG_ERR VTDPREFIX, "Queued Invalidation hardware not found\n"); @@ -1883,12 +1894,12 @@ int iommu_setup(void) for ( i = 0; i < max_page; i++ ) iommu_map_page(dom0, i, i); - enable_vtd_translation(); - if ( init_vtd_hw() ) - goto error; + init_vtd_hw(); setup_dom0_devices(); setup_dom0_rmrr(); iommu_flush_all(); + enable_vtd_translation(); + init_vtd2_hw(); return 0; -- 2.30.2